import axios from "axios";
import { useCounterStore } from '@/store/index'


// 9、封装axios设置公共请求头token
axios.interceptors.request.use((config)=>{
    const store = useCounterStore()
    config.headers.Authorization = store.userInfo.token
    return config
})
axios.interceptors.response.use((data)=>{
    return data.data
})

export default axios